package com.iron.visual.admin.config;

import com.iron.visual.admin.notify.SmsNotifier;
import de.codecentric.boot.admin.server.domain.entities.InstanceRepository;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;

/**
 * 自定义监控告警 （短信提醒方式）
 *
 * @author YT
 * @date 2019-07-11
 */
public class SmsNotifierConfiguration {

    @Bean
    @ConditionalOnMissingBean
    public SmsNotifier smsNotifer(InstanceRepository repository){
        return new SmsNotifier(repository);
    }
}
